package com.financing.platform.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IBankCardDao;
import com.financing.platform.dto.BankCardDTO;
import com.financing.platform.util.SqlName;
import com.financing.platform.vo.BankCardVO;

/**
 * @Title: BankCardDaoImpl.java
 * @Package com.financing.platform.dao.impl
 * @Description: 银行卡DAO实现 
 * @author  lisu
 */
@Repository("bankCardDaoImpl")
public class BankCardDaoImpl extends BaseDaoImpl implements IBankCardDao {

	@SuppressWarnings("unchecked")
	public List<BankCardVO> queryBankCardList(BankCardVO bankCardVO)
			throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.bankCardList,bankCardVO);
	}
	
	public int queryBankCardListCount(BankCardVO cardVO) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.bankCardListCount, cardVO);
	}

	public int updateBankCard(BankCardDTO bankCardDTO) throws SQLException {
		return 0;
	}

	public int insertBankCard(BankCardDTO bankCardDTO) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.bankCardAdd, bankCardDTO);
	}

	public int deleteBankCard(BankCardDTO bankCardDTO) throws SQLException {
		return (Integer) this.sqlMapClient.delete(SqlName.bankCardDelete,bankCardDTO);
	}


}

	